/*
* 角色api
*
*/

import { postRequest, getRequest } from '@/lib/axios';

export const rolesApi = {
    /*
    * 创建角色
    *
    */
    create: (params) => {
        return postRequest('/api/private/roles/create', params);
    },

    /**
     *  查询所有角色信息
     * 
    */
    list: (params) => {
        return postRequest('/api/private/roles/list', params);
    },

    /**
     *  根据id查询角色信息
     * 
    */
    findOne: (params) => {
        return postRequest('/api/private/roles/findOne', params);
    },

    /**
     *  根据id查询多个角色信息
     * 
    */
    findRoles: (params) => {
        return postRequest('/api/private/roles/findRoles', params);
    },

    /**
     *  更新角色信息
     * 
    */
    update: (params) => {
        return postRequest('/api/private/roles/update', params);
    },

    /**
     *  删除角色信息
     * 
    */
    delete: (params) => {
        return postRequest('/api/private/roles/delete', params);
    },

    /**
     *  删除所有角色信息
     * 
    */
    deleteAll: () => {
        return postRequest('/api/private/roles/deleteAll');
    },
}